package com.medical.app.controller;

import com.medical.app.common.dto.PatientDto;
import com.medical.app.service.PatientService;
import com.qf.medical.response.ResponseEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/*
 * @Date : 2024/4/30 上午10:50
 * @Created by Lang
 * @ProjectName : medical-appointment-registration
 */
@RestController
@RequestMapping("/patient")
@Api(tags = "患者模块api")
public class PatientController {
    @Resource
    private PatientService patientService;

    @GetMapping("/listByWei")
    @ApiOperation(value = "根据微信号查询患者列表")
    public ResponseEntity<List<PatientDto>> list(@RequestParam("weichatId") Integer weichatId) {
        return ResponseEntity.success(patientService.listByWei(weichatId));
    }
}
